﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="gift_index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>完美一天 推送“型”动</title>
<meta property="wb:webmaster" content="3ef17f59a6fa16b7" />
<link href="images/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/swfaddress.js"></script>
<script type="text/javascript">
    var params = {
        quality: "high",
        scale: "noscale",
        wmode: "transparent",
        allowscriptaccess: "always",
        bgcolor: "#000000"
    };
    var flashvars = { };
    var attributes = {
        id: "flashcontent",
        name: "flashcontent"
    };
    swfobject.embedSWF("main.swf", "flashcontent", "1280", "700", "10.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
<style type="text/css">
<!--
body{ margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:16px;}
#flashbox{ width:1280px; height:700px; margin:0 auto;position:relative;}
#flashbox .regbox01{ width:350px; position:absolute; left:125px; top:100px;}
#flashbox .regbox01 .iform{ background-color:#e5e5e5; border:#cccccc solid 1px; height:18px;}
#flashbox .regbox02{ width:357px; height:80px; position:absolute; right:50px; bottom:75px; background:url(images/bk_input.jpg) bottom no-repeat;}
#flashbox .regbox02 .iform{width:260px; border:0; background-color:#ececec; height:17px;}

#flashbox .notesbox{position:absolute; width:463px; height:533px;background:url(images/bkpopimg02.gif) top left no-repeat;left:95px;top:90px;color:#ffffff; z-index:99999;}
#flashbox .notesbox .title{ font-weight:bold; font-size:14px; padding-left:10px;}
#flashbox .notesbox .nottxt{ width:330px; float:left; margin:50px 0 0 30px;}
#flashbox .notesbox .clsbtn{ float:right;}
#flashbox .notesbox li{ list-style:decimal; margin-bottom:10px;}

.xh {font-size:18px; font-weight:bold; color:#1696e8;}


#flashbox .winner{ width:970px; position:absolute; left:125px; top:80px;}
#flashbox .winner .btns{ width:970px; height:33px;}
.btns a.btn01{background:url(images/btn01.png); display:block; width:119px; height:33px; float:left; margin-right:3px; cursor:pointer}
.btns a.btn01:hover{ background:url(images/btn01_on.png);}
.btns a.btn02{background:url(images/btn02.png); display:block; width:119px; height:33px; float:left; margin-right:3px; cursor:pointer}
.btns a.btn02:hover{ background:url(images/btn02_on.png);}
#flashbox .winner .subTitle{ background:url(images/line.gif) bottom repeat-x; padding:10px 0 5px 0;}
.box01 {width:920px; height:150px; overflow:auto; margin-top:10px; margin-left:25px; margin-bottom:10px;}
.box01 td{width:115px;}
.box01 th{width:270px;background: url(images/bgTd.gif); font-family:Arial; font-size:14px; text-align:left;color:#666; line-height:20px; padding:20px 20px 0 30px;}
.box01 th a{color:#666; text-decoration:none}

.box02 {width:920px; height:210px; overflow:auto; margin-top:5px; margin-left:25px;}
.box02 td{width:100px; text-align:center; padding:5px 0px 0px 0;}
.box02 td a{color:#666; text-decoration:none}
.box02 td a:hover{color:#666; text-decoration: underline}
.box02 th{background:#666666; font-family:Arial; font-size:12px; color:#fff; padding:5px 0px; text-align:center; font-weight:normal}
-->
</style>
<script src="/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
  _userv=2;
  urchinTracker();
</script>
</head>

<body style="background:url(bg.jpg)">
<div id="flashbox">

<!--  数据保护条款  -->
<div class="notesbox" id="txt01" style="left:-1000px;">
<div class="nottxt">
	<p class="title">数据保护条款</p>
	<ol>
	  <li>大众进口汽车销售有限公司保证所有个人信息数据都将按照隐私保护规定进行处理。</li>
	  <li>用户通过本网站提交的任何个人信息，将用于本次试驾活动的申请和接收来自大众进口汽车提供的产品、服务、活动等信息。我们会通过电子邮件、电话或邮寄的方式向您提供相关信息，或联合其他经过严格筛选的经销商向您提供您所感兴趣的资讯，或邀请您参加我们的市场活动和客户调查。</li>
	  <li>以上个人信息数据可由大众进口汽车销售有限公司及其授权经销商共同持有，并可由大众进口汽车销售有 限公司及其授权经销商用于其正常的商业活动，包括但不限于根据本人所提供的信息以及与本人联系。</li>
	  <li>除上述情况，在得到您的许可的情况下，以上信息数据将被保留和进行相应处理，除此之外不会向第三方披露。</li>
	  <li>在不限制您依法享有的权利的前提下，大众进口汽车销售有限公司保留随时修改或撤销本保密政策部分或全部的权利以及最终解释权。</li>
	</ol>
</div>
<div class="clsbtn"><a href="#" onclick="document.getElementById('txt01').style.left='-1000px'; return false;"><img src="images/img_close.gif" width="44" height="41" border="0" /></a></div>
</div>
<!--  数据保护条款  -->

<div id="flashcontent">
		<!--SEO-->
		<div id="noflash">
			<p><strong>You need to upgrade your Flash Player</strong></p>
		</div>
</div>
<%--<div class="popdiv02"><iframe src="LotteryDraw.aspx" name="iframe2" width="595" height="240" scrolling="no" frameborder="0" id="iframe1" style="border:0px;display:none" allowtransparency="true"></iframe></div>--%>
<div class="popdivh" id="popdiv"><iframe src="" name="iframe" width="510" height="420" scrolling="no" frameborder="0" id="iframe" style="border:0px;display:none" allowtransparency="true"></iframe></div>

<form runat="server" id="form1">
<asp:HiddenField ID="camname" runat="server" />
<asp:HiddenField ID="sourec" runat="server" />
<asp:HiddenField ID="channel" runat="server" />
<asp:HiddenField ID="hdnProvince" runat=server />
<asp:HiddenField ID="hdnCity" runat=server />
<asp:HiddenField ID="hdnDealer" runat=server />
<div id="testdrive" style="display:none">
<div class="regbox01">
  <p><img src="images/txt01.png" width="215" height="53" /></p>
  <span style="line-height:20px;">*为必填信息。</span>
  <table width="350" border="0" cellspacing="0" cellpadding="4"> 

    <tr>
      <td width="7"><img src="images/1.png" width="16" height="16" /></td>
      <td colspan="2">选择您感兴趣的大众进口汽车车型</td>
      </tr>
    <tr>
      <td class="xh">&nbsp;</td>
      <td colspan="2"><asp:RadioButtonList runat="server" ID="model" RepeatDirection="Horizontal">
        <asp:ListItem Text="大众进口Golf旅行轿车" Value="26"></asp:ListItem>
        <asp:ListItem Text="大众进口CrossGolf" Value="19"></asp:ListItem>
      </asp:RadioButtonList>
      <%--
      <input id="radio3" type="radio" name="gender" value="gender_1" />
        大众进口Golf旅行轿车                       
          <input id="radio4" type="radio" name="gender" value="gender_1" />
        大众进口CrossGolf --%></td>
      </tr>
    <tr>
      <td><img src="images/1.png" width="16" height="16" /></td>
      <td width="80">您的姓名：</td>
      <td width="263"><asp:TextBox ID="username" maxlength="20" runat="server" style="width:95px;" CssClass="iform" />
          <asp:RadioButtonList ID="sex" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                 <asp:ListItem Value="先生" Text="先生" />
                <asp:ListItem Value="女士" Text="女士" />
           </asp:RadioButtonList>
     </td>
    </tr>
    <tr>
      <td><img src="images/1.png" width="16" height="16" /></td>
      <td width="80">手机号码：</td>
      <td><asp:TextBox ID="mobile" runat="server" CssClass="iform" style="width:205px;" maxlength="11" />
          <span id="Label9" style="color:Red;"></span> </td>
    </tr>
    <tr>
      <td><img src="images/1.png" width="16" height="16" /></td>
      <td width="80">电子邮箱：</td>
      <td><asp:TextBox ID="email" runat="server" CssClass="iform" style="width:205px;" />
          <span id="Label11" style="color:Red;"></span> </td>
    </tr>
    <tr>
      <td><img src="images/1.png" width="16" height="16" /></td>
      <td width="80">购车时间：</td>
      <td><select id="year" name="year" style="width:75px;" onchange="setmonth(this.value);">
                            <option value="">请选择</option>
                            <option value='2012年'>2012年</option>
<option value='2013年'>2013年</option>
<option value='2014年'>2014年</option>
<option value='2014年以后'>2014年以后</option>
                      </select> 
                      <span>年</span> 
                      <span id="monthspan" style="visibility:inherit">
                      <select id="month" name="month" style="width:80px;">
                        <option value="">请选择</option>
                        <option value="1月">1月</option>
                        <option value="2月">2月</option>
                        <option value="3月">3月</option>
                        <option value="4月">4月</option>
                        <option value="5月">5月</option>
                        <option value="6月">6月</option>
                        <option value="7月">7月</option>
                        <option value="8月">8月</option>
                        <option value="9月">9月</option>
                        <option value="10月">10月</option>
                        <option value="11月">11月</option>
                        <option value="12月">12月</option>
                      </select>
                      月
                      </span>
      </td>
    </tr>
    <tr>
      <td><img src="images/1.png" width="16" height="16" /></td>
      <td width="80">购车预算：</td>
      <td><asp:TextBox ID="buybudget1" CssClass="iform" class="iform" style="width:75px;" size="4" runat="server" />
                <span style="color:#333333">万-</span>
                <asp:TextBox ID="buybudget2" runat="server" CssClass="iform"  class="iform" style="width:75px;" size="4" />
                <span style="color:#333333">万</span></td>
    </tr>
    <tr>
      <td class="xh">&nbsp;</td>
      <td width="80">选择经销商：</td>
      <td><select id="dealerprovince" name="dealerprovince"  style="width:90px;" onchange="setCity(this.value,'dealercity');">
        <option value="">请选择</option>
        <option value="30">安徽</option>
<option value="2">北京</option>
<option value="31">福建</option>
<option value="32">甘肃</option>
<option value="33">广东</option>
<option value="34">广西</option>
<option value="35">贵州</option>
<option value="36">海南</option>
<option value="37">河北</option>
<option value="38">河南</option>
<option value="39">黑龙江</option>
<option value="40">湖北</option>
<option value="41">湖南</option>
<option value="42">吉林</option>
<option value="43">江苏</option>
<option value="44">江西</option>
<option value="45">辽宁</option>
<option value="46">内蒙古</option>
<option value="47">宁夏</option>
<option value="49">山东</option>
<option value="50">山西</option>
<option value="51">陕西</option>
<option value="3">上海</option>
<option value="52">四川</option>
<option value="53">天津</option>
<option value="55">新疆</option>
<option value="56">云南</option>
<option value="57">浙江</option>
<option value="58">重庆</option>
        </select>
省
<select id="dealercity" name="dealercity"  style="width:90px;" onchange="setDealer(this.value);"><option value="">请选择</option></select>市</td>
    </tr>
    <tr>
      <td class="xh">&nbsp;</td>
      <td width="80"><img src="images/z.gif" width="80" height="1" /></td>
      <td><select id="dealer" name="dealer" style="width:200px;" onchange="setHiddenDealer(this.value);"><option value="">请选择</option></select></td>
    </tr>
    <tr>
      <td width="7"><img src="images/1.png" width="16" height="16" /></td>
      <td colspan="2">您是否接受其他的市场信息活动?      
        <asp:RadioButtonList ID="isincept" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"  >
                 <asp:ListItem Value="1" Text="是" />
                <asp:ListItem Value="0" Text="否" />
           </asp:RadioButtonList></td>
      </tr>
    <tr>
      <td class="xh">&nbsp;</td>
      <td colspan="2">您所填写的信息将用于此次试驾申请以及大众进口汽车其他相关活动且会被严格保密。</td>
      </tr>
    <tr>
      <td class="xh">&nbsp;</td>
      <td width="80">&nbsp;</td>
      <td align="right"><input type="checkbox" name="isagree" id="isagree" runat="server" Checked="True"  />
        我已阅读并接受<a href="#" style="font-weight:bold; color:#2671a8;" onclick="document.getElementById('txt01').style.left='95px'; return false;">数据保护条款</a></td>
    </tr>
    <tr>
      <td class="xh">&nbsp;</td>
      <td colspan="2" align="right"><a href="javascript:void(0)" onclick="document.getElementById('form1').reset();"><img src="images/btn_r01.png" width="101" height="37" style="margin-right:10px;" border="0"/></a><asp:LinkButton ID="sub" OnClick="Sub_click" OnClientClick="return dosubmit();" runat="server"><img src="images/btn_s01.png" width="101" height="37" border="0" /></asp:LinkButton></td>
      </tr>
  </table>
</div>
<div class="regbox02">
<table width="357" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="50" colspan="2"><a href="http://vico.vw.com.cn/zh/easy_buy/dealer_search/dealersearch1.html" onClick="javascript:urchinTracker ('/try/jingxiaoshang');" target="_blank"><img src="images/btn_ds.png" width="170" height="35" border="0" style="margin-right:17px;" id="c01" onmouseover="document.getElementById('c01').src='images/btn_ds_on.png'" onmouseout="document.getElementById('c01').src='images/btn_ds.png'" /></a><a href="http://vico.vw.com.cn/zh/easy_buy/order_car/bookingonline.html" target="_blank" onClick="javascript:urchinTracker ('/try/yuding');"><img src="images/btn_ol.png" width="170" height="35" border="0" id="c02" onmouseover="document.getElementById('c02').src='images/btn_ol_on.png'" onmouseout="document.getElementById('c02').src='images/btn_ol.png'" /></a></td>
    </tr>
  <tr>
    <td width="270" height="29" style="padding-left:10px;"><input type="text" id="subemail" name="subemail" class="iform" value="提交EMAIL地址，领略更多型变多彩生活。" onfocus="this.value='';" onclick="this.value=''" onmouseout="if(this.value==''){this.value='提交EMAIL地址，领略更多型变多彩生活。'}"/></td>
    <td width="77"><a href="javascript:void(0);" onClick="urchinTracker ('/try/subemail');cemail();"><img src="images/z.gif" width="72" height="26" border="0" alt="提交" /></a></td>
  </tr>
</table>
<div style="display:none"><img src="images/btn_ds_on.png" /><img src="images/btn_ol_on.png" /></div>
</div>
</div>
</form>

<%-- 
<input type="submit" name="gotogift" value="礼物推送" onclick="gotogift(1)" /> 
<input type="submit" name="gotogift" value="关闭" onclick="closegift()" /> 
<input type="submit" name="gotogift" value="再次打开推送结果" onclick="opengiftresult()" /> 
<input type="submit" name="gotogift" value="打开试驾" onclick="opentestdirve()" /> 
<input type="submit" name="gotogift" value="关闭试驾" onclick="closetestdirve()" />  --%> 
<!-- 获奖结果start -->  
  <div class="winner" id="winners" style="display:none;">
    <div><img src="images/title.png" alt="获奖名单" /></div>
    <div class="btns"><a class="btn01" title="奖项设置" href="#/detail" onclick="javascript:urchinTracker ('/reward/set');"></a><a class="btn02" title="我要推送" href="#/home" onclick="javascript:urchinTracker ('/reward/send');"></a></div>
    <div class="subTitle"><img src="images/subTitle1.png" /></div>
    <div class="box01">
	<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <%=GetFirendAwards() %>
  </tr>
</table>

    </div>
    <div class="subTitle"><img src="images/subTitle2.png" /></div>
	<div class="box02">
	
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <%=GetUserAwards()%>
  </tr>
</table>
	
	

    </div>
  </div>

<!-- 获奖结果end -->  
</div>
<script type="text/javascript">
        //礼物推送
    function gotogift(giftid) {
            document.getElementById("iframe").src = "selectsns.aspx?gid=" + giftid;
            document.getElementById("popdiv").className = "popdiv01";
            document.getElementById("iframe").width = "510";
            document.getElementById("iframe").height = "420";
            
            document.getElementById("iframe").style.display = "block";
        }
        //关闭
        function closegift()
        {
            document.getElementById("popdiv").className="popdivh";
           // document.getElementById("iframe2").style.display="none";
        }
		//msnback
		function gomsnback(code,gid){
			document.getElementById("iframe").src="msnback2.aspx?gid="+gid+"&code=" + code;
		}
        //再次打开推送结果
        function opengiftresult(){
            document.getElementById("popdiv").className = "popdiv02";
            document.getElementById("iframe").width = "595";
            document.getElementById("iframe").height = "240";
       //     document.getElementById("iframe").style.display="block";
        }
        //打开试驾
        function opentestdirve() {
            document.getElementById("testdrive").style.display = "block";
        }
        //关闭试驾
        function closetestdirve()
        {
            document.getElementById("testdrive").style.display = "none";
        }
        function gotestdrive() {
            //closegift();
            setTimeout("gototest()", 1100);
        }
        function gototest() {
            document.location.replace("index.aspx#/try");
        }
        //打开获奖名单
        function openwinners(){
            document.getElementById("winners").style.display = "block";
           // alert("获奖名单");
        }
        function closewinners(){
            //alert("关闭获奖名单");
            document.getElementById("winners").style.display = "none";
        }
		
        function cemail(){
            var form = document.forms[0];
            if(form.subemail.value==""){
                form.subemail.value = "内容不能为空";
                return false;
            }
            if(form.subemail.value != "" && !CheckEmail(form.subemail.value)){
                form.subemail.value = "您输入的EMAIL格式有误，请重新输入。";
                return false;
            }
            $.post("emailsave.aspx","email=" + form.subemail.value,function(res){
                if(!res.indexOf("0")>-1){
                    form.subemail.value = "发送成功";
                }else{
                    form.subemail.value = "发送失败，请重试！";
                }
            });
            $.post("Golf_getEmail.aspx", "email=" + form.subemail.value + "&source=" + form.sourec.value, function(res) {

            });
            return true;
        }
        
        function dosubmit(){
            urchinTracker ('/try/sub');
            var form = document.forms[0];
            var errorStr = "";
            if(!isChecked(form.model)){
                errorStr += "请选择大众进口汽车车型\n";
                alert(errorStr);
                return false;
            }
            if (form.username.value == "" || form.username.value.length < 2) {
                errorStr += "请输入您的真实姓名\n";
                alert(errorStr);
                return false;
            }
            if (!isChecked(form.sex)) {
                errorStr += "请选择您的称谓\n";
                alert(errorStr);
                return false;
            } 
            if (form.mobile.value == "") {
                errorStr += "请准确输入您的手机号码\n";
                alert(errorStr);
                return false;
            }
            if (form.mobile.value != "") {
                var tmp = /^1[3-9]\d{9}$/;
                if (!tmp.test(form.mobile.value)) {
                    errorStr += "请准确输入您的手机号码\n";
                    alert(errorStr);
                    return false;
                }
            }
            if (form.email.value == "") {
                errorStr += "请输入您的电子邮箱\n";
                alert(errorStr);
                return false;
            }
            if (form.email.value != "" && !CheckEmail(form.email.value)) {
                errorStr += "请输入您的电子邮箱\n";
                alert(errorStr);
                return false;
            }
   
            if(form.year.value=="" || form.month.value==""){
                errorStr += "请选择购车时间\n";
                alert(errorStr);
                return false;
            }
            var buyreg = /^\d+$/;
            if (!buyreg.test(form.buybudget1.value) || !buyreg.test(form.buybudget2.value)) {
                errorStr += "请正确输入您的购车预算\n";
                alert(errorStr);
                return false;
            }
            if (parseInt(form.buybudget2.value) < parseInt(form.buybudget1.value)) {
                errorStr += "请正确输入您的购车预算\n";
                alert(errorStr);
                return false;
            }
            
            if (!isChecked(form.isincept)) {
                errorStr += "请确认是否接受信息，加入精彩纷呈的品牌活动。\n";
                alert(errorStr);
                return false;
            }
            if (form.isagree.checked == false) {
                errorStr += "请阅读并接受数据保护条款\n";
                alert(errorStr);
                return false;
            }
            /*if (errorStr.length > 0) {
                alert(errorStr);
                return false;
            }*/
            urchinTracker ('/try/suc');
            return true;
        }

        function isChecked(elm) {
            if (elm.length > 0) {
                for (i = 0; i < elm.length; i++) {
                    if (elm[i].checked)
                        return true;
                }
            } else {
                if (elm.checked)
                    return true;
            }
            return false;
        }
        function CheckEmail(email) {
            ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
            ok2 = "[].@-_";

            for (i = 0; i < email.length; i++) {
                if (ok.indexOf(email.charAt(i)) < 0) {
                    //  alert("email信箱格式不对!\n");
                    return (false);
                }
            }
            if (ok2.indexOf(email.charAt(0)) >= 0) {
                // alert("email信箱格式不对!\n");
                return (false);
            }

            if (ok2.indexOf(email.charAt(email.length - 1)) >= 0) {
                //  alert("email信箱格式不对!\n");
                return (false);
            }

            if (!((email.indexOf('@', 0) != -1) && (email.indexOf('.', 0) != -1) && (email.length > 5))) { //alert("email信箱格式不对!\n");
                return false;
            }
            if (email.indexOf('@') != email.lastIndexOf('@')) { //alert("email信箱格式不对!\n");
                return false;
            }
            return true;
        }

        var dcitys = Array();
        dcitys['30'] = [[95, '合肥']]
        dcitys['2'] = [[59, '北京']]
        dcitys['31'] = [[75, '厦门'], [118, '宁波'], [77, '泉州']]
        dcitys['32'] = [[97, '兰州']]
        dcitys['33'] = [[74, '中山'], [73, '广州'], [72, '东莞'], [71, '深圳'], [114, '惠州'], [112, '汕头']]
        dcitys['34'] = [[79, '南宁']]
        dcitys['35'] = [[103, '贵阳']]
        dcitys['36'] = [[80, '海口']]
        dcitys['37'] = [[68, '唐山'], [67, '石家庄']]
        dcitys['38'] = [[94, '郑州']]
        dcitys['39'] = [[66, '哈尔滨']]
        dcitys['40'] = [[117, '武汉']]
        dcitys['41'] = [[78, '长沙']]
        dcitys['42'] = [[65, '长春']]
        dcitys['43'] = [[87, '南京'], [91, '南通'], [90, '常州'], [89, '无锡'], [88, '苏州']]
        dcitys['44'] = [[96, '南昌']]
        dcitys['45'] = [[61, '沈阳'], [60, '大连']]
        dcitys['46'] = [[109, '包头'], [70, '鄂尔多斯'], [69, '呼和浩特']]
        dcitys['47'] = [[104, '银川']]
        dcitys['49'] = [[108, '淄博'], [107, '济南'], [106, '烟台'], [105, '青岛']]
        dcitys['50'] = [[64, '太原'], [110, '大同']]
        dcitys['51'] = [[115, '榆林'], [101, '西安']]
        dcitys['3'] = [[5, '上海']]
        dcitys['52'] = [[98, '成都']]
        dcitys['53'] = [[63, '天津']]
        dcitys['55'] = [[102, '乌鲁木齐']]
        dcitys['56'] = [[99, '昆明']]
        dcitys['57'] = [[85, '嘉兴'], [83, '义乌'], [82, '台州'], [81, '杭州'], [113, '金华'], [111, '温州']]
        dcitys['58'] = [[100, '重庆']]

        var dealers = Array();
        dealers['95'] = [[57, '安徽风之星汽车股份有限公司']]
        dealers['59'] = [[1000, '大众汽车北京中心'], [8, '北京亚之杰合众汽车销售服务有限责任公司'], [7, '北京中进众旺辉腾定制中心'], [6, '北京中进众旺汽车销售服务有限公司三里屯展厅'], [5, '北京中进众旺汽车销售服务有限公司'], [4, '北京华日菱汽车贸易有限公司'], [3, '大众汽车北京中心']]
        dealers['118'] = [[42, '宁波中进众旺汽车销售服务有限公司'], [41, '宁波众通汽车有限公司']]
        dealers['77'] = [[32, '泉州盈众润和汽车销售有限公司']]
        dealers['75'] = [[31, '福建盈众润达汽车销售有限公司'], [30, '厦门建发汽车有限公司'], [78, '厦门辉腾定制中心'], [33, '厦门盈众润宇汽车销售有限公司']]
        dealers['97'] = [[59, '兰州金河康汽车销售服务有限公司']]
        dealers['72'] = [[26, '东莞市华熙汽车销售有限公司']]
        dealers['73'] = [[28, '广州鸿粤鸿众汽车销售服务有限公司'], [27, '广东乘用汽车销售有限公司'], [80, '广州辉腾定制中心']]
        dealers['114'] = [[86, '惠州市德意进口汽车销售有限公司']]
        dealers['112'] = [[76, '汕头市众驰汽车有限公司']]
        dealers['71'] = [[25, '深圳华熙辉腾定制中心'], [24, '深圳市华熙汽车销售服务有限公司']]
        dealers['74'] = [[29, '中山市德熙进口汽车销售服务有限公司']]
        dealers['79'] = [[36, '广西弘德腾锐汽车销售服务有限责任公司']]
        dealers['103'] = [[68, '贵州新双立汽车销售服务有限责任公司']]
        dealers['80'] = [[37, '海南华众汽车销售服务有限公司']]
        dealers['67'] = [[20, '河北华菱丰汽车贸易有限公司']]
        dealers['68'] = [[21, '唐山众腾汽车销售有限公司']]
        dealers['94'] = [[82, '河南中豫汽车贸易有限公司'], [56, '河南国际汽车贸易有限公司']]
        dealers['66'] = [[19, '哈尔滨大昌合众汽车销售服务有限公司']]
        dealers['117'] = [[85, '武汉锐腾汽车贸易服务有限公司'], [73, '武汉辉腾定制中心'], [55, '湖北尚腾汽车贸易有限公司']]
        dealers['78'] = [[35, '湖南德熙进口汽车销售服务有限公司'], [34, '湖南德顺汽车贸易有限公司']]
        dealers['65'] = [[18, '长春大昌合众汽车销售服务有限公司'], [84, '长春尚腾汽车汽车销售服务有限公司']]
        dealers['90'] = [[50, '常州德立汽车销售服务有限公司']]
        dealers['87'] = [[72, '南京景众汽车销售服务有限公司江宁展厅'], [47, '南京景众汽车销售服务有限公司中山路展厅'], [46, '南京交家电车辆有限公司']]
        dealers['91'] = [[51, '南通德立汽车销售服务有限公司']]
        dealers['88'] = [[48, '苏州市金阊众翔汽车销售服务有限公司']]
        dealers['89'] = [[49, '无锡腾众汽车销售服务有限公司']]
        dealers['96'] = [[58, '江西尚腾汽车贸易有限公司']]
        dealers['60'] = [[9, '大连大昌合众汽车销售服务有限公司']]
        dealers['61'] = [[10, '沈阳大昌合众汽车销售服务有限公司'], [11, '辽宁川达汽车销售服务有限公司']]
        dealers['109'] = [[70, '包头众锐汽车销售服务有限公司']]
        dealers['70'] = [[23, '鄂尔多斯市德众鑫汽车销售有限责任公司']]
        dealers['69'] = [[22, '内蒙古华菱丰汽车贸易有限公司']]
        dealers['104'] = [[69, '宁夏和众进口汽车销售服务有限公司']]
        dealers['107'] = [[15, '济南德辉汽车销售服务有限公司']]
        dealers['105'] = [[13, '青岛德辉汽车销售有限公司']]
        dealers['106'] = [[14, '烟台德辉汽车销售服务有限公司']]
        dealers['108'] = [[16, '淄博润之坤汽车销售有限公司']]
        dealers['110'] = [[74, '大同市华菱丰汽车贸易有限公司']]
        dealers['64'] = [[17, '山西华菱丰汽车贸易有限公司']]
        dealers['101'] = [[66, '陕西新丰泰汽车技术开发有限责任公司']]
        dealers['115'] = [[87, '榆林德泰汽车销售服务有限公司']]
        dealers['5'] = [[54, '上海铂众汽车销售有限公司'], [53, '上海中进众旺汽车销售服务有限公司'], [52, '上海腾众汽车销售服务有限公司安亭4S店']]
        dealers['98'] = [[61, '成都新双立辉腾定制中心'], [60, '四川新双立汽车销售服务有限责任公司']]
        dealers['63'] = [[71, '天津市中顺联众汽车服务有限公司'], [12, '天津空港众辉汽车销售有限公司']]
        dealers['102'] = [[83, '新疆天汇华鑫汽车销售服务有限公司'], [67, '新疆腾众汽车销售服务有限公司']]
        dealers['99'] = [[63, '云南兴星机电贸易有限公司'], [62, '云南德众汽车销售服务有限公司'], [79, '昆明辉腾定制中心']]
        dealers['81'] = [[38, '浙江捷通汽车有限公司'], [81, '杭州辉腾定制中心'], [45, '杭州百得利汽车有限公司'], [44, '浙江奥德汽车有限公司']]
        dealers['85'] = [[43, '嘉兴禾众睿德汽车销售服务有限公司']]
        dealers['113'] = [[77, '金华之远汽车有限公司']]
        dealers['82'] = [[39, '台州旅行者汽车销售服务有限公司']]
        dealers['111'] = [[75, '温州之远汽车有限公司']]
        dealers['83'] = [[40, '义乌市恒通汽车销售服务有限公司']]
        dealers['100'] = [[65, '重庆百事达华轩汽车销售服务有限公司'], [64, '重庆博众辉锐汽车销售服务有限公司'], [88, '重庆百事达华尊汽车销售服务有限公司']]

        function setProvice(pid) {
            document.getElementById(pid).options.length = 0;
            var option = document.createElement("OPTION");
            option.text = "省份";
            option.value = "";
            document.getElementById(pid).options.add(option);
            var exitis = "";
            for (var i = 0; i < pcd.length; i++) {
                var city = pcd[i];

                if (exitis.indexOf(city[0] + ",") < 0) { //去重
                    option = document.createElement("OPTION");
                    option.text = city[0];
                    option.value = city[0];
                    document.getElementById(pid).options.add(option);
                    exitis += city[0] + ",";
                }

            }
        }

        function setCity(pname,cid) {
            initDealer();

            //代码添加
            //添加日期：2012-01-19
            //添加人员：刘扬
            //添加原因：对隐藏域进行赋值
            var select = document.getElementById("dealerprovince");
            var options = select.options;
            var provinceName = "";
            for (var i = 0; i < options.length; i++) {
                if (options[i].value == pname) {
                    provinceName = options[i].text;
                    break;
                }
            }
            document.getElementById("hdnProvince").value = provinceName;
            document.getElementById(cid).options.length = 0;
            var option = document.createElement("OPTION");
            option.text = "城市";
            option.value = "";
            document.getElementById(cid).options.add(option);
            var pcd = dcitys[pname];
            if(pcd&&pcd.length){
            for (var i = 0; i < pcd.length; i++) {
                var city = pcd[i];
                //if (city[0] == pname) {
                    //if (exitis.indexOf(city[1] + ",") < 0) {
                        option = document.createElement("OPTION");
                        option.text = city[1];
                        option.value = city[0];
                        document.getElementById(cid).options.add(option);
                        //exitis += city[1] + ",";
                   // }
               // }
            }
            }
        }
        
        function setCity2(pname,cid) {
            initDealer();

            document.getElementById(cid).options.length = 0;
            var option = document.createElement("OPTION");
            option.text = "城市";
            option.value = "";
            document.getElementById(cid).options.add(option);
            var pcd = citys[pname];
            for (var i = 0; i < pcd.length; i++) {
                var city = pcd[i];
                //if (city[0] == pname) {
                    //if (exitis.indexOf(city[1] + ",") < 0) {
                        option = document.createElement("OPTION");
                        option.text = city[1];
                        option.value = city[0];
                        document.getElementById(cid).options.add(option);
                        //exitis += city[1] + ",";
                   // }
               // }
            }
        }

        function setDealer(cname) {
            //var pname = document.getElementById("dealerprovince").value;
            initDealer();

            //代码添加
            //添加日期：2012-01-19
            //添加人员：刘扬
            //添加原因：对隐藏域进行赋值
            var select = document.getElementById("dealercity");
            var options = select.options;
            var cityName = "";
            for (var i = 0; i < options.length; i++) {
                if (options[i].value == cname) {
                    cityName = options[i].text;
                    break;
                }
            }
            document.getElementById("hdnCity").value = cityName;

            var pcd = dealers[cname];
            if(pcd&&pcd.length){
            for (var i = 0; i < pcd.length; i++) {
                var city = pcd[i];
                //if (city[0] == pname && city[1] == cname) {
                    option = document.createElement("OPTION");
                    option.text = city[1];
                    option.value = city[0];
                    document.getElementById("dealer").options.add(option);
                //}
            }
            }
        }

        function setHiddenDealer(value) {
            //代码添加
            //添加日期：2012-01-19
            //添加人员：刘扬
            //添加原因：对隐藏域进行赋值
            var select = document.getElementById("dealer");
            var options = select.options;
            var dealerName = "";
            for (var i = 0; i < options.length; i++) {
                if (options[i].value == value) {
                    dealerName = options[i].text;
                    break;
                }
            }
            document.getElementById("hdnDealer").value = dealerName;
        }

        function initDealer() {
            document.getElementById("dealer").options.length = 0;
            var option = document.createElement("OPTION");
            option.text = "请选择离您最近的经销商";
            option.value = "";
            document.getElementById("dealer").options.add(option);
        }
        function resetError(vid) {
            document.getElementById(vid).innerHTML = "";
        }
        function initdata() {
            //setProvice("dealerprovince");
            //setProvice("province");
        }
        function setmonth(yearvalue){
            document.getElementById("monthspan").style.visibility = 'inherit';
            if(yearvalue.indexOf("以后")>-1){
                document.getElementById("monthspan").style.visibility = 'hidden';
                document.getElementById("month").options.length= 0;
                var ops = document.getElementById("month").options;
                ops.add(new Option(" "," "));
            }else{
                
            
            var date = new Date();
            var m = 1;
            if(date.getFullYear() + "年"==yearvalue){
                m = date.getMonth() + 1;
            }
            document.getElementById("month").options.length= 0;
            document.getElementById("month").value = "";
            var ops = document.getElementById("month").options;
            ops.add(new Option("请选择",""));
            for(var i=0;m<=12;m++){
                ops.add(new Option(m + "月",m + "月"));
            }
            
            }

        }


        
    </script>
    <script type="text/javascript" src="jquery-1.4.2.js"></script>
    <div class="footer">
   <div class="boxLeft">
     <ul>
		<li class="vwd4_first"><a href="http://www.volkswagenag.com/vwag/vwcorp/content/en/homepage.html" target="_blank">VOLKSWAGEN AG</a></li>
		<li><a href="http://www.volkswagen.com/vwcms_publish/vwcms/master_public/virtualmaster/en2.html" target="_blank">Volkswagen International</a></li>
	</ul>
  </div>
  <div id="vwd4_footer" class="vwd4_clear">
    <ul class="vwd4_m506">
      <li class="vwd4_first">© Volkswagen 2011</li>
      <li><a href="http://www.vw.com.cn/zh/tools/navigation/footer/ContactUs.html" target="_blank">联系我们</a></li>
      <li><a href="http://www.vw.com.cn/zh/tools/navigation/footer/legal.html" target="_blank">版权声明</a></li>
      <li><a href="http://www.miibeian.gov.cn/" target="_blank">京ICP备08103718-8</a></li>
      <!--<li style="float:left"><a href="http://www.volkswagenag.com/vwag/vwcorp/content/en/homepage.html" target="_blank">VOLKSWAGEN AG</a></li>
      <li style="float:left"><a href="http://www.volkswagen.com/vwcms_publish/vwcms/master_public/virtualmaster/en2.html" target="_blank">Volkswagen International</a></li>-->
    </ul>
  </div>
</div>
</body>
</html>